<?php
require_once('PHPUnit/Framework.php');
require_once("../SMTransmitter/SMTransmitter.class.php");
require_once("../SMTransmitter/Reporter.interface.php");
require_once("../SMTransmitter/CurlReporter.class.php");
require_once("../SMTransmitter/SMMessage.class.php");
require_once("../SMTransmitter/Converter.class.php");

class CurlReporterTest extends PHPUnit_Framework_TestCase{
    private $dao=null;

    protected function setUp(){
        $this->dao = new CurlReporter();
    }

    public function testPost(){
        $this->dao->setUrl("http://www.example.com");
        $content = "test content";
        $result = $this->dao->post($content);

        $this->assertEquals($result, true, "error: data mangled.");
    }

    public function testSendMessage(){
        $result = $this->dao->sendMessage("test message", "http://www.example.com");
        $this->assertEquals($result, true, "error: data mangled.");
    }
}

?>